package com.tom;

import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

import com.mysql.jdbc.Connection;
import com.mysql.jdbc.Driver;

public class DBtest {

	public static void main(String[] args) {
		//1
		try {
			DriverManager.deregisterDriver(new Driver());
			//Class.forName("com.mysql.jdbc.Driver");
			java.sql.Connection conn =DriverManager.getConnection(
					"jdbc:mysql://j.snpy.org/j102", "jstu", "abc123");
		Statement stmt = conn.createStatement();
		int rowCount = stmt.executeUpdate("INSERT INTO users (id,password,email) values ('stu11','123','531213@yahoo.com')");
		System.out.println(rowCount);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		
	}

}
